package hxy.ecnu.model;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
//import org.hibernate.validator.constraints.NotBlank; //这个类已经被废弃，建议不要使用

import lombok.Data;

@Data
public class User implements Serializable {
	/**
	 * 使用验证框架
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	@NotBlank(message = "name不可以为空")
	private String name;
	@Length(min = 8, max = 16, message = "密码长度必须在8-16位之间")
	private String password;

}
